package com.matt.controller.group.staffExtend;

import com.dotflat.rest.controller.RestfulBaseController;
import com.dotflat.staffExtend.domain.StaffExtendInfoRank;
import com.dotflat.staffExtend.po.StaffExtendInfoRankPO;
import com.dotflat.staffExtend.service.StaffExtendInfoRankService;
import com.matt.commons.exception.BusinessException;
import com.matt.commons.model.ErrorCode;
import com.matt.commons.model.StatusResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.matt.foundation.constant.RequestConstant.TICKET;

@RestController
@RequestMapping("/web/group/staff_rank/rank")
@Slf4j
@Api(tags = "Web集团 - 员工评分 - 评分记录，仅查询")
public class WebGroupStaffRankController extends RestfulBaseController<StaffExtendInfoRank, StaffExtendInfoRankService, StaffExtendInfoRankPO> {

    @Autowired
    public void setBaseService(StaffExtendInfoRankService service){
        super.setBaseService(service);
    }

    @ApiOperation(value = "【禁用】增加一条记录", hidden = true)
    @PostMapping()
    public StatusResponse add(@RequestHeader(TICKET) String ticket, StaffExtendInfoRankPO param){
        throw new BusinessException(ErrorCode.UNDEFINED, "你不应该使用这个接口");
    }

}
